package com.ikas.ai.server.module.system.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ikas.ai.server.module.system.model.Permission;
import com.ikas.ai.server.module.system.model.vo.RoleAuthVo;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PermissionDAO extends BaseMapper<Permission> {

    List<Permission> findPermissionByRole(Long roleId);

    void setAuth(RoleAuthVo roleAuthVo);

    void deletePermissionByRoleId(Long roleId);

    List<Permission> getAllResource();

    List<Permission> getResourceByUserName(String userName);

    void deleteRolePermByIds(List<Long> list);

    List<Long> selectRoleIdsByPermId(Long id);

    List<Integer> selectPid(List<Integer> menuIdList);
}